"""meiduo_mall URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path,include

urlpatterns = [
    path('admin/', admin.site.urls),
    # 配置总路由，包含子路由
    # 配置users模块
    path('',include(("users.urls","users"),namespace="users")),
    # 配置contents模块
    path('',include(("contents.urls","contents"),namespace="contents")),
    # 配置verifications模块
    # 定义总路由，不需要设置命名空间，因为不需要重定向
    path('',include("verifications.urls")),
    # 包含oauth子路由
    path('',include("oauth.urls")),
    # areas
    path('',include("areas.urls")),
    # 包含goods模块的子路由
    path('',include(("goods.urls","goods"),namespace='goods')),
    # 包含haystack子路由
    # path('search/',include("haystack.urls")),
    # 包含购物车子路由
    path('',include(("carts.urls","carts"),namespace="carts")),
    # 包含订单模块的子路由
    path('',include(("orders.urls","orders"),namespace="orders")),
    # 包含支付模块的路由
    path('',include(("payment.urls","payment"),namespace="payment")),
]
